<script setup lang="ts">
// import { onMounted, computed } from "vue";
import { onMounted } from "vue";

import { useExamStore } from "@/store/modules/exam";
import { useRouter } from 'vue-router'
const router = useRouter()

const examStore = useExamStore();
const initApp = async () => {
    // TODO
    await examStore.init();


    // 刷新进入首页 需解开注释
    router.replace('/')

};
onMounted(() => {
    initApp();
});

// const isMobile = computed(() => {
//     const viewportWidth = document.documentElement.clientWidth;
//     return viewportWidth <= 768;
// });
</script>

<template>
    <div class="root">
        <router-view />
    </div>
</template>

<style lang="scss" scoped></style>
